package tronglv.gs.view;

import java.util.ArrayList;

import com.example.paralletkill.R;


import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ChonBanAdapter extends BaseAdapter{
	private Context context;
	private ArrayList<String> archiement = new ArrayList<String>();
	private LayoutInflater inflat;
//	private int image[] = new int[] {R.drawable.star3,R.drawable.star2,R.drawable.star1,R.drawable.star4};
	
	public ChonBanAdapter(Context context, ArrayList<String> archiement){
		  this.context = context;
		  this.archiement = archiement;
		  inflat = LayoutInflater.from(context);
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 10;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return archiement.get(arg0);
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		final ViewHolder holder;
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = inflat.inflate(R.layout.chonban_item, null,true);
			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}
		return convertView;
	}
	
	private class ViewHolder{
		private TextView nameAr;
		private TextView bonusAr;
		private ImageView ratingAr;
	}

	
}
